using([
    'pc/js/mod/write/vue-write-post',
    'pc/js/mod/write/vue-write-list',
    'pc/js/mod/write/vue-write-edit'
], (VueWritePost, VueWriteList, VueWriteEdit) => {

const router = VueRouter.createRouter({
    history: VueRouter.createWebHashHistory(),
    routes: [
        { path: '/', redirect: '/write/post' },
        {
            path: '/write/post',
            component: VueWritePost
        },
        {
            path: '/write/list',
            component: VueWriteList
        },
        {
            path: '/write/edit/:id',
            component: VueWriteEdit,
            props: true
        }
    ]
});


const app = Vue.createApp({
    template:
`<div>
    <div class="writing-center-side">
        <a class="writing-center-side-header" href="javascript:;"></a>
        <ul>
            <li>
                <a title="折叠" class="writing-center-side-item" href="javascript:;">
                    <i class="writing-center-side-listicon"></i>
                    <i class="writing-center-side-dropicon up"></i>
                    <span>文章</span>
                </a>
                <ul>
                    <li>
                        <router-link class="writing-center-side-subitem" to="/write/post">我要投稿</router-link>
                    </li>
                    <li>
                        <router-link class="writing-center-side-subitem" to="/write/list">投稿列表</router-link>
                    </li>
                </ul>
            </li>
        </ul>
    </div>
    <div class="writing-center-main"><router-view></router-view></div>
</div>`
});

app.use(router);
app.mount('#app');

});
